﻿@model IEnumerable<ClientPhone>

@foreach (var item in Model)
{
    if (item.Extension.HasValue)
    {
        <div>
            <strong>@item.PhoneNumberType.Name:</strong>
        </div>
        <div>
            <a href="tel:@item.AreaCode @item.Exchange-@item.LineNumber">(@item.AreaCode) @item.Exchange - @item.LineNumber &nbsp;&nbsp;<text>.ext </text>@item.Extension</a>
        </div>
    }
    else
    {
        <div><strong>@item.PhoneNumberType.Name:</strong></div>
        <div><a href="tel:@item.AreaCode @item.Exchange-@item.LineNumber">(@item.AreaCode) @item.Exchange - @item.LineNumber &nbsp;&nbsp;</a></div>
    }
}